<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>控制搜索结果集的返回格式</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="sphinxclient.runqueries.html">SphinxClient::runQueries</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="sphinxclient.setconnecttimeout.html">SphinxClient::setConnectTimeout</a></div>
 <div class="up"><a href="class.sphinxclient.html">SphinxClient</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="sphinxclient.setarrayresult" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">SphinxClient::setArrayResult</h1>
  <p class="verinfo">(PECL sphinx &gt;= 0.1.0)</p><p class="refpurpose"><span class="refname">SphinxClient::setArrayResult</span> &mdash; <span class="dc-title">控制搜索结果集的返回格式</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-sphinxclient.setarrayresult-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span> <span class="methodname"><strong>SphinxClient::setArrayResult</strong></span>
    ( <span class="methodparam"><span class="type">bool</span> <code class="parameter">$array_result</code><span class="initializer"> = false</span></span>
   )</div>

  <p class="para rdfs-comment">
   控制搜索结果集的返回格式（匹配项按数组返回还是按hash返回）.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-sphinxclient.setarrayresult-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">array_result</code></em></dt>

     <dd>

      <p class="para">
       如果 <em><code class="parameter">array_result</code></em> 设置为 <strong><code>FALSE</code></strong>, 匹配项以PHP hash格式返回，文档ID为键，其他信息（权重、属性）为值。如果 <em><code class="parameter">array_result</code></em> 设置为 <strong><code>TRUE</code></strong>, 匹配项以普通数组返回，包括匹配项的全部信息（含文档ID）.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-sphinxclient.setarrayresult-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   总是返回 <strong><code>TRUE</code></strong>.
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="sphinxclient.runqueries.html">SphinxClient::runQueries</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="sphinxclient.setconnecttimeout.html">SphinxClient::setConnectTimeout</a></div>
 <div class="up"><a href="class.sphinxclient.html">SphinxClient</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
